// 处理信息时间
export function handlingTime(arr, bool) {
    // 遍历更改时间
    let prev = null //前一条信息的发送时间
    let current = null //后一条信息的发送时间
    let distant = null //时间差
    for (var i = 1; i < arr.length; i++) {
        prev = new Date(arr[i - 1].date).getTime()
        current = new Date(arr[i].date).getTime()
        distant = (current - prev) / 1000 / 60
        distant >= 3 ? (arr[i].showTime = true) : (arr[i].showTime = false)
    }
    if (bool) {
        arr[0].showTime = true
    }
    return arr
}